package com.shiwaixiangcun.monitor.domain;


import com.rabbit.spring.data.domain.BaseEntity;
import com.shiwaixiangcun.monitor.enums.WorkOrderStatus;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * Created by Administrator on 2017/4/14.
 */
@Entity
@Table(name = "ms_work_order_timeout_rule")
@DynamicUpdate
@DynamicInsert
public class WorkOrderTimeoutRule extends BaseEntity<Long> {

    public static final String WORK_ORDER_TIME_OUT_DIC = "10001";

    @ManyToOne
    @JoinColumn(name = "category_id")
    private WorkOrderCategory category;

    @Enumerated(EnumType.STRING)
    private WorkOrderStatus status;

    private Integer time;//超时时间

    @ManyToOne
    @JoinColumn(name = "user_id")
    private User user; // 超时需要提醒的人

    public WorkOrderTimeoutRule() {
    }

    public WorkOrderCategory getCategory() {
        return category;
    }

    public void setCategory(WorkOrderCategory category) {
        this.category = category;
    }

    public WorkOrderStatus getStatus() {
        return status;
    }

    public void setStatus(WorkOrderStatus status) {
        this.status = status;
    }

    public Integer getTime() {
        return time;
    }

    public void setTime(Integer time) {
        this.time = time;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }
}
